<?php
require_once 'config.php';
$page =  PGlobal::getLayoutTemplate();


$banggia = new Template(TEMPLATE_DIR.'banggia.html');
$hsx = new HangSx();
foreach($hsx->listAll() as $row){
    $ophsx = new Template(TEMPLATE_DIR.'option-hangsx-item.html');
    $ophsx['mahsx'] = $row['mahsx'];
    $ophsx['tenhsx'] = $row['tenhsx'];
    $banggia['option-hangsx-item'] .= $ophsx->render();
}

$page['content'] = $banggia->render();
$page->addCss('css/banggia.css');
$page->addJs('jsc/banggia.js');

echo $page->render();